<?php

namespace common\components;


use yii\log\EmailTarget;

class ErrorLogEmailTarget extends EmailTarget
{
    public function export()
    {
        if (!empty($this->messages) && isset($this->messages[0]) && count($this->messages[0]) > 2) {
            $this->message['subject'] = $this->messages[0][2];
        }
        parent::export();
    }
}